package com.eduction.modules.system.dao;

import java.sql.SQLException;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.eduction.common.dbutil.DbHelper;
import com.eduction.modules.system.entity.SchoolPointMap;

@Repository
public class SchoolPointMapRepository {

	@Autowired
	private SchoolPointMapDao schoolPointMapDao;
	@Autowired
	private DbHelper dbhelper;
	/**
	 * 保存学校与测评点映射关系
	 * @param m
	 */
	public void saveSchoolPointMap(SchoolPointMap m){
		this.schoolPointMapDao.save(m);
	}
	
	/**
	 * 查询一条
	 * @throws SQLException 
	 */
	public SchoolPointMap queryOneByPid(String id) throws SQLException{
		String sql = "select * from t_school_point_map where point_id = ?";
		return this.dbhelper.getBean(sql, SchoolPointMap.class, id);
	}
}
